/*
 * @Author: ZephyrGao
 * @Date: 2024-02-08 15:23:28
 * @Description: 系统路由 
 * Copyright (c) 2024 by ZephyrGao, All Rights Reserved. 
 */

import {RouteRecordRaw} from "vue-router";
import {RouteEnum} from "@/enum/RouteEnum.ts";
import {
  BASE_LOGIN_COMP,
  BASE_REGISTER_COMP,
  PAGE_NOT_FOUND_COMP,
  NOT_FOUND,
  USER
} from "@/router/constant.ts";

// Root /dashboard/analysis
export const ROOT_ROUTE: RouteRecordRaw = {
  path: RouteEnum.BASE_ROOT,
  name: 'root',
  redirect: RouteEnum.BASE_HOME,
  meta:{}
}
// redirect
// export const REDIRECT_ROUTE: RouteRecordRaw = {
//   path: RouteEnum.BASE_REDIRECT,
//   name: 'redirect',
//   component: BASE_REDIRECT_COMP,
//   meta:{
//     hidden : true
//   }
// }
export const USER_ROUTES: RouteRecordRaw = {
  path: '/user',
  redirect: '/user/login',
  children : [
    {
      path: 'login',
      name: 'login',
      component: BASE_LOGIN_COMP,
      meta:{}
    },
    {
      path: 'register',
      name: 'register',
      component: BASE_REGISTER_COMP,
      meta:{
        hidden : true
      }
    },
  ] as RouteRecordRaw[]
}

// 404
export const PAGE_NOT_FOUND_ROUTE: RouteRecordRaw = {
  path: '/:pathMatch(.*)*',
  name: NOT_FOUND,
  component: PAGE_NOT_FOUND_COMP,
  meta: {
  },
}

// PAGE_NOT_FOUND_ROUTE
export const SYSTEM_ROUTES :RouteRecordRaw[] = [ROOT_ROUTE,USER_ROUTES]
